package user

import "time"

/**
	用户缓存
**/
var userMap UserExMap

func init() {
	userMap = NewUserExMap()
}

func AddUser(key string, value interface{}) bool{
	return  userMap.Add(key, value)
}


func DeleteUser(key string, value interface{})(bool,*time.Time) {
	return  userMap.Delete(key, value)
}

func DeleteOUser(key string, value interface{}){
	 userMap.DeleteOvalue(key,value)
}

func DeleteValue(value interface{}) {
	userMap.DeleteValue(value)
}

func DeleteKey(key string) {
	userMap.DeleteKey(key)
}



func GetSetOneUser(key string, value interface{})(interface{},bool){
	return userMap.GetSetOneValue(key,value)
}

func GetUsers(key string) []interface{} {
	return userMap.Get(key)
}

func GetUserAddtime(key string) *time.Time {
	return userMap.GetAddTime(key)
}

func GetLen(key string) int {
	return userMap.Len(key)
}
func AllLen() int {
	return userMap.AllLen()
}
func GetKeyArray(start int, num int) []interface{} {
	return userMap.GetKeyArray(start, num)
}
func GetALlKeyArray() []string {
	return userMap.GetALLKey()
}
